//验证登录用户
function validate_user(tbl){
	var res=new Record();
	var num=dao.count("users",Cnd.wrap("(username='"+tbl.username+"' or email='"+tbl.username+"' or phone='"+tbl.username+"') "))
	print(num)
	if(num<1){
		res.put("status",0)
		res.put("msg","用户不存在!")
		return res;
	}
	var u=$fetch("users",Cnd.wrap("(username='"+tbl.username+"' or email='"+tbl.username+"' or phone='"+tbl.username+"') and `password`='"+tbl.password+"'"))
	if(u==null){
		res.put("status",0)
		res.put("msg","密码错误!")
	}else{
		res.put("status",1)
		res.put("msg","用户存在")
	}
	return res;
}